<template>
	<view class="m-l-30 m-r-30 m-b-20 back-color-c radius-16 p-l-30 p-r-30" @click="click(data.contract_id)">
		<view class="flex-between h-96 font-28 border-bottom-f5">
			<text class="color-a">{{data.contract_no}}</text>
			<text class="color-d">{{data.contract_status === 1 ? '等待签字' : '合同已签'}}</text>
		</view>
		<view>
			<view class="flex-between m-t-16 font-28">
				<text class="color-d font-32 font-weight-600">{{data.address}}</text>
				<text class="color-a" v-if="data.contract_type === 1">分红比{{data.prorate_dividends}}%</text>
				<text class="color-a" v-else>装修面积{{data.registration_area}}m²</text>
			</view>
			<view class="flex-between m-t-10 font-28">
				<text class="color-d">6-2408 {{data.lessee_name}}</text>
			</view>
			<view class="flex-between m-t-16 font-28">
				<text
					class="color-b p-l-10 p-r-10 h-40 back-color-f radius-8 font-24">{{data.contract_type === 1 ? '运营合同' : '装修合同'}}</text>
			</view>
			<view class="flex-between m-t-14 font-28 p-b-32">
				<text
					class="color-a">{{data.start_time | date('yyyy-mm-dd')}}～{{data.end_time | date('yyyy-mm-dd')}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			data: {
				type: Object,
				default: () => {}
			}
		},
		methods: {
			click(id) {
				uni.$u.route(`/pages/contract/contract-details?id=${id}`)
			}
		},
	}
</script>

<style>
</style>
